import 'package:flutter/material.dart';

class Stack_MainView extends StatelessWidget {
  const Stack_MainView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.yellow,
      height: 400.0,
      width: 300.0,
      child: Stack(
        children: [
          Positioned(
            left: 10.0,
            top: 10.0,
            child: Container(
              color: Colors.red,
              width: 150.0,
              height: 50.0,
            ),
          ),
          Positioned(
            left: 10.0,
            top: 70.0,
            child: Container(
              color: Colors.red,
              width: 150.0,
              height: 50.0,
            ),
          ),

          Positioned(
            left: 10.0,
            top: 130.0,
              child: Container(
            width: 200.0,
            height: 100.0,
            child: Image.network(
              "https://www.itying.com/images/flutter/1.png",
              fit: BoxFit.cover,
            ),
          )),

          Positioned(
            left: 10.0,
            top: 205.0,
            child: Container(
              height: 25.0,
              child: Text("这里是文字",style: TextStyle(color: Colors.white,fontSize: 20.0,fontWeight: FontWeight.bold),),
            ))
        ],
      ),
    );
  }
}
